package bank_access;

import java.io.Serializable;
import mware_lib.ISkeleton;

public class ManagerSkeleton implements ISkeleton {
  private ManagerImplBase manager;

  public ManagerSkeleton(ManagerImplBase manager) {
    this.manager = manager;
  }
  
  @Override
  public Serializable invokeMethod(String methodName, Serializable[] params) {
    switch (methodName) {
      case "createAccount":
        try {
          return manager.createAccount((String)params[0], (String)params[1]);
        } catch (RuntimeException r) {
          return r;
        }
    }
    return null; //Sollte nie erreicht werden
  }
}
